/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FileSystem;

import java.io.File;

/**
 *
 * @author asfeor
 */
interface Delete
{
	boolean delete (String src); 
}
public class Deliting  implements Delete{

    @Override
    public boolean delete(String src) {
        File f1=new File(src);
       try{ String[] DirList=f1.list();
 int i;
 for (i=0; i<DirList.length; i++){
   if (new File(f1.getAbsoluteFile()+File.separator+DirList[i]).isDirectory()) 
                                                delete(f1.getAbsoluteFile()+File.separator+DirList[i]);  
   if (new File(f1.getAbsoluteFile()+File.separator+DirList[i]).isFile()) 
                delete(f1.getAbsoluteFile()+File.separator+DirList[i]);       
           }
return true;
} catch (NullPointerException e) {return false;}
}
    
}
